package com.lagou.util;/**
 * Created by IntelliJ IDEA.
 * User: Yangdx.
 * Date: 2020/7/25.
 * Time: 22:23.
 * Tags: Code, we are serious.
 */

import java.util.Random;

/**
 * @author
 * @create 2020-07-25 22:23
 **/
public class RandomUtil {
    public static String getCode(int length) {
        Random random = new Random();
        String result = "";
        for (int i = 0; i < length; i++) {
            result += random.nextInt(10);
        }
        return result;
    }
}
